import Layout from '@/layout'

/* 银行管理员路由模块 */
const adminRouter = [
    /* 系统首页 */
    {
        path: '/manager',
        name: 'Manager',
        component: Layout,
        redirect: '/manager/index',
        meta: {
            title: '系统首页',
            icon: 'peoples',
            roles: ['BA']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/index'),
            name: '/manager/index',
            meta: {
                title: '系统首页',
                icon: 'home',
            }
        }] 
    },
    /* 金融风控分析 */
    {
        path: '/analysis',
        name: 'Analysis',
        component: Layout,
        redirect: '/analysis/basics',
        meta: {
            title: '金融风控分析',
            icon: 'home',
            roles: ['BA']
        },
        children: [{
            path: 'basics',
            component: () => import('@/views/roles/admin/analysis/basics'),
            name: '/analysis/basics',
            meta: {
                title: '贷款基本面',
            }
        },{
            path: 'badBasics',
            component: () => import('@/views/roles/admin/analysis/badBasics'),
            name: '/analysis/badBasics',
            meta: {
                title: '不良贷款风险',
            }
        },{
            path: 'guarantee',
            component: () => import('@/views/roles/admin/analysis/guarantee'),
            name: '/analysis/guarantee',
            meta: {
                title: '融资担保',
            }
        },{
            path: 'details',
            component: () => import('@/views/roles/admin/analysis/details'),
            name: '/analysis/details',
            meta: {
                title: '风控明细',
            }
        }]
    },
    /* 客户分配 */
    {
        path: '/work',
        name: 'Work',
        component: Layout,
        redirect: '/work/assign',
        meta: {
            title: '客户分配',
            icon: 'work',
            roles: ['BA']
        },
        children: [{
            path: 'assign',
            name: '/work/assign',
            component: () => import('@/views/roles/admin/work/assign_customer'),
            meta: {
                title: '客户分配',
            }
        }]
    },
    /* 工作台 */
    {
        path: '/a_work',
        name: 'AWork',
        component: Layout,
        redirect: '/a_work/assign',
        meta: {
            title: '工作台',
            icon: 'work',
            roles: ['BA'],
        },
        children: [
            /* {
                path: 'assign',
                name: '/a_work/assign',
                component: () => import('@/views/roles/admin/work/assign_customer'),
                meta: {
                    title: '客户分配',
                }
            }, */


            /* {
                path: 'auth_manage',
                name: '/a_work/auth_manage',
                component: () => import('@/views/roles/admin/work/auth_manage'),
                meta: {
                    title: '授权协议管理',
                }
            },
            {
                path: 'auth_examine',
                name: '/a_work/auth_examine',
                component: () => import('@/views/roles/admin/work/auth_examine'),
                meta: {
                    title: '授权协议审核',
                }
            },
            {
                path: 'auth_records',
                name: '/a_work/auth_records',
                component: () => import('@/views/roles/admin/work/auth_records'),
                meta: {
                    title: '授权任务',
                }
            }, */


            /* {
                path: 'portfolio',
                name: '/a_work/portfolio',
                component: () => import('@/views/roles/admin/work/portfolio_manager'),
                meta: {
                    title: '融资管理',
                }
            },
            {
                path: 'loan',
                name: '/a_work/loan',
                component: () => import('@/views/roles/admin/work/loan_manager'),
                meta: {
                    title: '贷后管理',
                }
            } */
        ]
    },
    /* 客户管理 */
    {
        path: '/a_customer',
        name: 'ACustomer',
        component: Layout,
        redirect: '/a_customer/purpose_list',
        meta: {
            title: '客户管理',
            icon: 'customer',
            roles: ['BA'],
        },
        children: [{
                path: 'purpose_list',
                name: '/a_customer/purpose_list',
                component: () => import('@/views/roles/admin/customer/purpose'),
                meta: {
                    title: '意向客户',
                }
            },
            {
                path: 'white_list',
                name: '/a_customer/white_list',
                component: () => import('@/views/roles/admin/customer/white'),
                meta: {
                    title: '订阅客户',
                }
            },

            {
                path: 'recommend_list',
                name: '/a_customer/recommend_list',
                component: () => import('@/views/roles/admin/customer/recommend'),
                meta: {
                    title: '推荐客户',
                }
            },
            {
                path: 'black_list',
                name: '/a_customer/black_list',
                component: () => import('@/views/roles/admin/customer/black'),
                meta: {
                    title: '黑名单客户',
                }
            },
        ]
    },
    /* 融资管理 */
    {
        path: '/a_finance',
        name: 'AFinance',
        component: Layout,
        redirect: '/a_finance/productList',
        meta: {
            title: '融资管理',
            icon: 'money',
            roles: ['BA'],
        },
        children: [{
                path: 'productList',
                name: '/a_finance/productList',
                component: () => import('@/views/roles/admin/finance/productList'),
                meta: {
                    title: '金融产品管理',
                }
            },
            {
                path: 'orgFinanceApply',
                name: '/a_finance/orgFinanceApply',
                component: () => import('@/views/roles/admin/finance/orgFinanceApply'),
                meta: {
                    title: '融资申请管理',
                }
            },
            {
                path: 'orgFinanceApply',
                name: '/a_finance/creditFinanceApply',
                component: () => import('@/views/roles/admin/finance/creditFinanceApply'),
                meta: {
                    title: '征信公司融资申请管理',
                }
            },
            {
                path: 'creditFinanceIntention',
                name: '/a_finance/creditFinanceIntention',
                component: () => import('@/views/roles/admin/finance/creditFinanceIntention'),
                meta: {
                    title: '征信公司融资意向管理',
                }
            },
            {
                path: 'orgFinanceIntention',
                name: '/a_finance/orgFinanceIntention',
                component: () => import('@/views/roles/admin/finance/orgFinanceIntention'),
                meta: {
                    title: '融资意向管理',
                }
            },
            {
                path: 'enterpriseAuth',
                name: '/a_finance/enterpriseAuth',
                component: () => import('@/views/roles/admin/finance/enterpriseAuth'),
                meta: {
                    title: '企业认证审核',
                }
            },
            {
                path: 'policy',
                name: '/a_finance/policy',
                component: () => import('@/views/roles/admin/finance/policy'),
                meta: {
                    title: '政策管理',
                }
            },
            // {
            //     path: 'white_list',
            //     name: '/a_customer/white_list',
            //     component: () => import('@/views/roles/admin/customer/white'),
            //     meta: {
            //         title: '订阅客户',
            //     }
            // },

            // {
            //     path: 'recommend_list',
            //     name: '/a_customer/recommend_list',
            //     component: () => import('@/views/roles/admin/customer/recommend'),
            //     meta: {
            //         title: '推荐客户',
            //     }
            // },
            // {
            //     path: 'black_list',
            //     name: '/a_customer/black_list',
            //     component: () => import('@/views/roles/admin/customer/black'),
            //     meta: {
            //         title: '黑名单客户',
            //     }
            // },
        ]
    },
    /* 风险预警管理 */
    {
        path: '/risk_warning',
        name: 'RiskWarning',
        component: Layout,
        redirect: '/risk_warning/messageCenter',
        meta: {
            title: '风险预警管理',
            icon: 'money',
            roles: ['BA'],
        },
        children: [{
                path: 'messageCenter',
                name: '/risk_warning/messageCenter',
                component: () => import('@/views/roles/admin/riskWarning/messageCenter'),
                meta: {
                    title: '信息中心',
                }
            },
            {
                path: 'riskIndexManagement',
                name: '/risk_warning/riskIndexManagement',
                component: () => import('@/views/roles/admin/riskWarning/riskIndexManagement'),
                meta: {
                    title: '信息中心',
                }
            },
        ]
    },
    /* 企业画像 */
    {
        path: '/portray',
        name: 'Portray',
        component: Layout,
        redirect: '/portray/index',
        meta: {
            title: '企业画像',
            icon: 'portrait',
            roles: ['BA']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/portray'),
            name: '/portray/index',
            meta: {
                title: '画像查询',
            }
        }]
    },
    /* 企业评估 */
    {
        path: '/assess',
        name: 'Assess',
        component: Layout,
        redirect: '/assess/index',
        meta: {
            title: '企业评估',
            icon: 'portrait',
            roles: ['BA']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/assess'),
            name: '/assess/index',
            meta: {
                title: '企业评估',
            }
        }]
    },
    /* 风险预警 */
    {
        path: '/credit',
        name: 'Credit',
        component: Layout,
        redirect: '/credit/extend_list',
        meta: {
            title: '风险预警',
            icon: 'credit',
            roles: ['BA'],
        },
        children: [{
            path: 'extend_list',
            component: () => import('@/views/roles/editor/customer/credit'),
            name: '/credit/extend_list',
            meta: {
                title: '风险预警',
            }
        }]
    },
    /* 额度查询 */
    {
        path: '/limit',
        name: 'Limit',
        component: Layout,
        redirect: '/limit/credit_list',
        meta: {
            title: '额度查询',
            icon: 'limit',
            roles: ['BA'],
        },
        children: [{
            path: 'credit_list',
            component: () => import('@/views/roles/editor/customer/limit'),
            name: '/limit/credit_list',
            meta: {
                title: '额度查询',
            }
        }],
    },
    /* 企业评分管理 */
    {
        path: '/s_coreManage',
        name: 'ScoreManage',
        component: Layout,
        redirect: '/s_coreManage/target',
        meta: {
            title: '企业评分管理',
            icon: 'customer',
            roles: ['BA'],
        },
        children: [/* {
                path: 'target',
                name: '/s_coreManage/target',
                component: () => import('@/views/gradManage/targetManage/index'),
                meta: {
                    title: '指标管理',
                }
            },
            {
                path: 'rule',
                name: '/s_coreManage/rule',
                component: () => import('@/views/gradManage/ruleManage/index'),
                meta: {
                    title: '模型管理（超管）',
                }
            }, */
            {
                path: 'ruleAdmin',
                name: '/s_coreManage/ruleAdmin',
                component: () => import('@/views/gradManage/ruleManageAdmin/index'),
                meta: {
                    title: '模型管理',
                }
            },
            {
                path: 'qScore',
                name: '/s_coreManage/qScore',
                component: () => import('@/views/gradManage/scoresQuery/index'),
                meta: {
                    title: '评分查询',
                }
            },
            {
                path: 'define',
                name: '/s_coreManage/define',
                component: () => import('@/views/gradManage/defineManage/index'),
                meta: {
                    title: '定义管理',
                }
            },
            {
                path: 'label_manage',
                name: '/s_coreManage/label_manage',
                component: () => import('@/views/gradManage/labelManage/index'),
                meta: {
                    title: '标签管理',
                }
            }
        ]
    },
    /* 额度管理 */
    // {
    //     path: '/a_limit',
    //     name: 'ALimit',
    //     component: Layout,
    //     redirect: '/a_limit/credit_list',
    //     meta: {
    //         title: '额度管理',
    //         icon: 'limit',
    //         roles: ['BA'],
    //     },
    //     children: [{
    //         path: 'credit_list',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_limit/credit_list',
    //         meta: {
    //             title: '授信额度',
    //         }
    //     }, {
    //         path: 'extend_list',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_limit/extend_list',
    //         meta: {
    //             title: '贷款额度',
    //         }
    //     }]
    // },
    /* 规则管理 */
    // {
    //     path: '/a_rules',
    //     name: 'ARules',
    //     component: Layout,
    //     redirect: '/a_rules/white_list_rules',
    //     meta: {
    //         title: '规则管理',
    //         icon: 'skill',
    //         roles: ['BA'],
    //     },
    //     children: [{
    //         path: 'r_dict',
    //         component: () => import('@/views/roles/admin/rule/r_dict'),
    //         name: '/a_rules/r_dict',
    //         meta: {
    //             title: '模型指标',
    //         }
    //     },
    //     {
    //         path: 'r_white',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_rules/r_white',
    //         meta: {
    //             title: '白名单规则',
    //         }
    //     },
    //     {
    //         path: 'r_credit',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_rules/r_credit',
    //         meta: {
    //             title: '授信规则',
    //         }
    //     },
    //     {
    //         path: 'r_tag',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_rules/r_tag',
    //         meta: {
    //             title: '标签规则',
    //         }
    //     },
    //     {
    //         path: 'r_risk',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_rules/r_risk',
    //         meta: {
    //             title: '风控规则',
    //         }
    //     },
    //     {
    //         path: 'r_limit',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_rules/r_limit',
    //         meta: {
    //             title: '额度测算规则',
    //         }
    //     }]
    // },
    
    /* 用户管理 */
    /* {
        path: '/a_user',
        name: 'AUser',
        component: Layout,
        redirect: '/a_user/index',
        meta: {
            title: '用户管理',
            icon: 'customer',
            roles: ['CM', 'BA', 'PA', 'GOV', 'CREDIT']
            //roles: ['BA'],
        },
        children: [{
            path: 'index',
            component: () => import('@/views/roles/admin/customer/cuser'),
            name: '/a_user/index',
            meta: {
                title: '客户经理管理',
            }
        }]
    }, */
    /* 下载管理 */
    // {
    //     path: '/a_download',
    //     name: 'ADownload',
    //     component: Layout,
    //     redirect: '/a_download/index',
    //     meta: {
    //         title: '下载管理',
    //         icon: 'download',
    //         roles: ['BA'],
    //     },
    //     children: [{
    //         path: 'index',
    //         component: () => import('@/views/dashboard/index'),
    //         name: '/a_download/index',
    //         meta: {
    //             title: '下载管理',
    //         }
    //     }]
    // },
   
]

export default adminRouter


